import http from '@/utils/request.js';

// 首页 待处理
export const getBuilding = (id) => {
	// return http.get('/repair/building/detail', { id });
	return http.request({
		url: '/repair/building/detail',
		method: 'get',
		data: { id }
	});
};

// 获取组织架构
export const getMembers = (id) => {
	// return http.get('/blade-system/dept/deptUserTree', { id });
	return http.request({
		url: '/blade-system/dept/deptUserTree',
		method: 'get',
		data: { id }
	});
};

// 获取组织架构
export const getGroups = (id) => {
	// return http.get('/blade-system/dept/dept-tree', { id });
	return http.request({
		url: '/blade-system/dept/dept-tree',
		method: 'get',
		data: { id }
	});
};
// 获取组织架构
export const getRepairGroups = (id) => {
	// return http.get('/plan/check/statistics/wx/count/dept/tree', { id });
	return http.request({
		url: '/plan/check/statistics/wx/count/dept/tree',
		method: 'get',
		data: { id }
	});
};

// 获取组织架构
export const getAllMembers = (id) => {
	// return http.get('/blade-system/dept/all/deptUserTree', { id });
	return http.request({
		url: '/blade-system/dept/all/deptUserTree',
		method: 'get',
		data: { id }
	});
};

// //////////////
// 执行审批
export const implementApprove = (data) => {
	// return http.post('/repair/business/flow/6/approve', data, true);
	return http.request({
		url: '/repair/business/flow/6/approve',
		method: 'post',
		data,
		textJson: true,
	});
};
